﻿CREATE TYPE [todoc].[TableColumns] AS TABLE (
    [TableSchema]           [sysname]       NOT NULL,
    [TableName]             [sysname]       NOT NULL,
    [ColumnName]            [sysname]       NOT NULL,
    [PKColumn]              BIT             NULL,
    [PKName]                [sysname]       NOT NULL,
    [PKClustered]           BIT             NULL,
    [PKFilegroup]           [sysname]       NULL,
    [PKColOrdinal]          SMALLINT        NULL,
    [PKDescOrder]           BIT             NULL,
    [PKPartitionScheme]     [sysname]       NULL,
    [PKPartitionOrdinal]    TINYINT         NULL,
    [CLIDXName]             [sysname]       NULL,
    [CLIDXUnique]           BIT             NULL,
    [CLIDXFilegroup]        [sysname]       NULL,
    [CLIDXColOrdinal]       SMALLINT        NULL,
    [CLIDXDescOrder]        BIT             NULL,
    [CLIDXPartitionScheme]  [sysname]       NULL,
    [CLIDXPartitionOrdinal] TINYINT         NULL,
    [IdentityColumn]        BIT             NULL,
    [ColPosition]           INT             NULL,
    [DataType]              [sysname]       NOT NULL,
    [IsUserDataType]        INT             NULL,
    [NumericPrecision]      TINYINT         NULL,
    [NumericScale]          INT             NULL,
    [CharMaxLength]         INT             NULL,
    [IsNullable]            BIT             NULL,
    [ColumnDefaultName]     [sysname]       NULL,
    [ColumnDefault]         NVARCHAR (4000) NULL,
    [IsComputedCol]         BIT             NULL,
    [ParameterType]         NVARCHAR (200)  NULL,
    [ParameterTypeSet]      NVARCHAR (200)  NULL,
    [TableColumnType]       NVARCHAR (100)  NULL,
    [ShadowTableColumnType] NVARCHAR (100)  NULL,
    [CheckConstraintName]   [sysname]       NOT NULL,
    [CheckConstraintDef]    NVARCHAR (4000) NOT NULL);

